function [ValueYear,ValueMonth,ValueDay]=ExtractDate(ValueDate)

ValueYear='';
ValueMonth='';
ValueDay='';
n1=1;
while n1<=size(ValueDate,2)-3
    if strcmp(ValueDate(1,n1:n1+3),'/Y_/')==1
        n4=n1+4;
        n1=n1+3;
        while n1<=size(ValueDate,2)-3&&strcmp(ValueDate(1,n1:n1+3),'/Y_/')==0
            n1=n1+1;
        end
        ValueYear=ValueDate(1,n4:n1-1);
    end
    if strcmp(ValueDate(1,n1:n1+3),'/M_/')==1
        n4=n1+4;
        n1=n1+3;
        while n1<=size(ValueDate,2)-3&&strcmp(ValueDate(1,n1:n1+3),'/M_/')==0
            n1=n1+1;
        end
        ValueMonth=ValueDate(1,n4:n1-1);
    end
    if strcmp(ValueDate(1,n1:n1+3),'/D_/')==1
        n4=n1+4;
        n1=n1+3;
        while n1<=size(ValueDate,2)-3&&strcmp(ValueDate(1,n1:n1+3),'/D_/')==0
            n1=n1+1;
        end
        ValueDay=ValueDate(1,n4:n1-1);
    end
    n1=n1+1;
end
    